package com.mytx.mapper;

import com.mytx.pojo.Orders;
import com.mytx.pojo.OrdersExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrdersMapper {

    List<Orders> queryOrderByAdvertisementId(String advertisementId);

    List<Orders> queryOrderByTopicId(String topicId);
    /**
     * 根据用户id 查询个人买进的订单
     * @param uId
     * @return
     */
    List<Orders> selectMyBuyOrders(String uId);

    /**
     * 查询卖出的订单
     * @param uId
     * @return
     */
    List<Orders> selectMySellOrders(String uId);

    //--------------------------------分界线------------------------------------

    int countByExample(OrdersExample example);

    int deleteByExample(OrdersExample example);

    int deleteByPrimaryKey(String id);

    int insert(Orders record);

    int insertSelective(Orders record);

    List<Orders> selectByExample(OrdersExample example);

    Orders selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);

    int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);

    int updateByPrimaryKeySelective(Orders record);

    int updateByPrimaryKey(Orders record);

}